year = int(input("请输入年份"))
month = int(input("请输入月份"))
if month in [1, 3, 5, 7, 8, 10, 12]:
    print(str(month) + "月有31天")
elif month in [4, 6, 9, 11]:
    print(month, "有30天")
else:
    if year % 400 == 0 or year % 4 == 0 and year % 100 != 0:
        print("%d年%d月有29天" % (year, month))
    else:
        print("%d年%d月有28天" % (year, month))
